<template>
  <span 
  :class="{ undo: item.state == '未完成', right: item.state == '正确' , error: item.state == '错误' }"
  >{{ item.id }}: {{ item.state }}</span>
</template>

<script>
export default {
    props: ['item'],
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>